home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / a_man / cat1 / xfs_copy.z / xfs_copy
Encoding:
Text File  |  2001-04-17  |  6.8 KB  |  133 lines

  1.  
  2.  
  3.  
  4. xxxxffffssss____ccccooooppppyyyy((((1111MMMM))))                                                      xxxxffffssss____ccccooooppppyyyy((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      xfs_copy - copy the contents of an XFS filesystem
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      xxxxffffssss____ccccooooppppyyyy [ ----dddd ] device|file device1 [ device2 device3 ... ]
  13.      xxxxffffssss____ccccooooppppyyyy [ ----dddd ] device|file file1
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      _x_f_s__c_o_p_y copies an XFS filesystem to one or more targets in parallel (see
  17.      _x_f_s(4)).  The first (source) argument must be the pathname of the device
  18.      or file containing the XFS filesystem.  The remaining arguments specify
  19.      one or more target devices or a filename.  If the pathnames specify
  20.      devices, a copy of the source XFS filesystem is created on each device.
  21.      If any of the source or target device names specify devices that are not
  22.      raw devices, _x_f_s__c_o_p_y attempts to locate the raw device corresponding to
  23.      the specified device and use the raw device instead.
  24.  
  25.      If there is only one target, that target can be the name of a regular
  26.      file in which case an image of the source XFS filesystem is created in
  27.      that file.  If the file does not exist, _x_f_s__c_o_p_y creates the file.  The
  28.      length of the resulting file is equal to the size of the source
  29.      filesystem.  However, if the file is created on an XFS filesystem, the
  30.      file consumes roughly the amount of space actually used in the source
  31.      filesystem by the filesystem and the XFS log.  The space saving is
  32.      because _x_f_s__c_o_p_y seeks over free blocks instead of copying them and the
  33.      XFS filesystem supports sparse files efficiently.
  34.  
  35.      _x_f_s__c_o_p_y can only be used to copy unmounted filesystems.  Otherwise, the
  36.      generated filesystem(s) would be inconsistent or corrupt.  Some versions
  37.      of _x_f_s__c_o_p_y may print a message that they have detected a mounted
  38.      filesystem, but are continuing the attempt to copy, and then issue a
  39.      message that they are aborting.  This is misleading, but not incorrect.
  40.      Unmount the filesystem and then issue the command.  This means that if
  41.      you want to copy the root (/) filesystem, you must first load the
  42.      miniroot, then unmount the root with the _i_n_s_t command
  43.  
  44.           admin umount /root
  45.  
  46.      and then do the copy.
  47.  
  48.      _x_f_s__c_o_p_y does not alter the source filesystem in any way.  Each new
  49.      (target) filesystem is identical to the original filesystem except that
  50.      new filesystems each have a new unique filesystem identifier (UUID).
  51.      Therefore, if both the old and new filesystems will be used as separate
  52.      distinct filesystems, _x_f_s__c_o_p_y or _x_f_s_d_u_m_p/_x_f_s_r_e_s_t_o_r_e should be used to
  53.      generate the new filesystem(s) instead of _d_d(1M) or other programs that
  54.      do block-by-block disk copying.
  55.  
  56.      The ----dddd (duplicate) option can be used if a true clone is desired.  This
  57.      should be done only if the new filesystem will be used as a replacement
  58.      for the original filesystem (such as in the case of disk replacement).
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. xxxxffffssss____ccccooooppppyyyy((((1111MMMM))))                                                      xxxxffffssss____ccccooooppppyyyy((((1111MMMM))))
  71.  
  72.  
  73.  
  74.      _x_f_s__c_o_p_y uses synchronous writes to ensure that write errors are
  75.      detected.  _x_f_s__c_o_p_y also uses _s_p_r_o_cs (see _s_p_r_o_c(2)) to perform
  76.      simultaneous parallel writes.  Therefore, _p_s(1) reports multiple copies
  77.      of _x_f_s__c_o_p_y while the copy is in progress.  _x_f_s__c_o_p_y creates one
  78.      additional _s_p_r_o_c for each target to be written.  All _s_p_r_o_cs die if
  79.      _x_f_s__c_o_p_y terminates or aborts.
  80.  
  81.      _x_f_s__c_o_p_y does not copy XFS filesystems that have a real-time section or
  82.      XFS filesystems with external logs.  In both cases, _x_f_s__c_o_p_y aborts with
  83.      an error message.
  84.  
  85. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  86.      _x_f_s__c_o_p_y reports errors to both stderr and in more detailed form to a
  87.      generated log file whose name is of the form
  88.      /_u_s_r/_t_m_p/_x_f_s__c_o_p_y._l_o_g.??????. If _x_f_s__c_o_p_y detects a write error on a
  89.      target, the copy of that one target is aborted and an error message is
  90.      issued to both stderr and the logfile, but the rest of the copies
  91.      continue.  When _x_f_s__c_o_p_y terminates, all aborted targets are reported to
  92.      both stderr and the logfile.  In some cases, _x_f_s__c_o_p_y may report the
  93.      message
  94.  
  95.           xfs_copy:  couldn't initialize simulation library
  96.  
  97.      following another error message.  This message is sometimes of use when
  98.      debugging problems, and should normally be ignored.
  99.  
  100.      If all targets abort or if there is an error reading the source
  101.      filesystem, _x_f_s__c_o_p_y immediately aborts.
  102.  
  103.      _x_f_s__c_o_p_y returns an exit code of 0 if all targets are successfully copied
  104.      and an exit code of 1 if any target fails.
  105.  
  106. BBBBUUUUGGGGSSSS
  107.      When moving filesystems from one disk to another, if the original
  108.      filesystem is less than 4 Gbytes long and the new filesystem will larger,
  109.      we recommend that _m_k_f_s and _x_f_s_d_u_m_p/_x_f_s_r_e_s_t_o_r_e be used instead of using
  110.      _x_f_s__c_o_p_y and _x_f_s__g_r_o_w_f_s. The filesystem layout resulting from using
  111.      _x_f_s__c_o_p_y/_x_f_s__g_r_o_w_f_s is almost always worse than the result of using
  112.      _m_k_f_s/_x_f_s_d_u_m_p/_x_f_s_r_e_s_t_o_r_e but in the case of small filesystems, the
  113.      differences can have a significant performance impact.
  114.  
  115.      _x_f_s__c_o_p_y does not copy XFS filesystems with real-time partitions or
  116.      external logs.
  117.  
  118.      If the source filesystem is bigger than the target partition, the copy
  119.      may succeed if the blocks at the end of the source filesystem are not in
  120.      use but the generated copy will not be a valid filesystem.
  121.  
  122. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  123.      mkfs_xfs(1M), xfsdump(1M), xfsrestore(1M), xfs(4), xlv(7M).
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.